In a DXL attribute i need to include the file a file with the code of the attribute. To make this inclusion parametric i want to use the "eval_" function, but if i use this function i can't use anymore the obj construct in the DXL attribute code. How come? How can i solve this problem? If i use "Object o=current" instead of "obj" it doesn't work and it update the dxl attribute only for the selected object. bungle_77 - Tue Jul 16 08:11:47 EDT 2013 |
Re: Eval_ for DXL attribute Today is your lucky day. Just a couple weeks ago I finally figured out how to solve another problem which has the same solution.
As usual, my code is twice as verbose as it really needs to be. I figure to put that in all my Attr-DX with different "a"djustable option for which include file to use. You can strip out all the"Interop" stuff and will need to add your logic for determing which include file. Credit MM for the "addr_" of "addr_" which makes passing "obj" and "attrDXLName" to the eval_ context. -Louie the above prevents all those nasty "confirm DXL Errors" you get when opening a module with attr-DXL errors, such as when the current client PC doesn't have "addins" pointing to the right place. |
Re: Eval_ for DXL attribute llandale - Tue Jul 16 15:31:44 EDT 2013 Today is your lucky day. Just a couple weeks ago I finally figured out how to solve another problem which has the same solution.
As usual, my code is twice as verbose as it really needs to be. I figure to put that in all my Attr-DX with different "a"djustable option for which include file to use. You can strip out all the"Interop" stuff and will need to add your logic for determing which include file. Credit MM for the "addr_" of "addr_" which makes passing "obj" and "attrDXLName" to the eval_ context. -Louie the above prevents all those nasty "confirm DXL Errors" you get when opening a module with attr-DXL errors, such as when the current client PC doesn't have "addins" pointing to the right place. Louie, What DOORS version is this code able to run under? |
Re: Eval_ for DXL attribute Doug.Zawacki - Thu Jul 18 10:05:03 EDT 2013 Louie, What DOORS version is this code able to run under? I'm running v9306 but I see no reason it won't work on any v9. Of course, the names of my include files don't apply to you and you will want to change them. I suppose the runningAsInteropServer() perm doesn't exist in v8. What error are you getting? |
Re: Eval_ for DXL attribute llandale - Thu Jul 18 16:51:24 EDT 2013 I'm running v9306 but I see no reason it won't work on any v9. Of course, the names of my include files don't apply to you and you will want to change them. I suppose the runningAsInteropServer() perm doesn't exist in v8. What error are you getting? Well after looking at the code again I see that my confusion is the fact that the line: #include <" a_TargetDXL "> is actually a continuation of the comment two lines above. Sorry, I was reading quickly and should have been more careful. No problems here. :)
|
Re: Eval_ for DXL attribute llandale - Tue Jul 16 15:31:44 EDT 2013 Today is your lucky day. Just a couple weeks ago I finally figured out how to solve another problem which has the same solution.
As usual, my code is twice as verbose as it really needs to be. I figure to put that in all my Attr-DX with different "a"djustable option for which include file to use. You can strip out all the"Interop" stuff and will need to add your logic for determing which include file. Credit MM for the "addr_" of "addr_" which makes passing "obj" and "attrDXLName" to the eval_ context. -Louie the above prevents all those nasty "confirm DXL Errors" you get when opening a module with attr-DXL errors, such as when the current client PC doesn't have "addins" pointing to the right place. Further testing and I now disfavor this approach. In regular Attr-DXL, the code is interpreted when the module is opened (and when you modify the code) and the interpreted code is run for each object as needed. This means the #include file is opened once (which takes a few short seconds). In the approach above, the #include reference is resolved real-time for each object, and a "few short seconds" for each object is a very long time when there are lots of objecs. Even for my Xttra-Context Attr-DXL that calculates all values for all objects all at once; I found that in DWA the attr-DXL seems to run for every object anyway, at least a big part of the time. This made it DWA time out. -Louie |